package cn.stylefeng.guns.modular.api.model.enums;


import cn.stylefeng.roses.kernel.model.exception.AbstractBaseExceptionEnum;

/**
 * 卫生管理提交状态枚举
 *  状态 -  0.未申请 1.申请中 2.申报成功 3.申报失败 4.正在申诉 5.申诉成功 6.申诉失败")-->
 *
 * @author stylefeng
 * @Date 2018年07月08日18:39:47
 */
public enum PlanStatusEnum implements AbstractBaseExceptionEnum {

    NORAML(0, "投放阶段"),
    GROW(1, "生长阶段"),
    HARVEST(2, "收成阶段"),
    DONE(3, "完成阶段");

    PlanStatusEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
    public static String getDesc(Integer code) {
        if (code == null) {
            return "";
        } else {
            for (PlanStatusEnum s : PlanStatusEnum.values()) {
                if (s.getCode().equals(code)) {
                    return s.getMessage();
                }
            }
            return "";
        }
    }


    private Integer code;

    private String message;

    @Override
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
